package com.ureport2.ureportConsole;

import com.bstek.ureport.console.UReportServlet;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

@EnableAutoConfiguration
@ImportResource(locations = {"classpath:context.xml"})
@Configuration
@ComponentScan(basePackages = "com.ureport2.ureportConsole")
public class AddUReport {
    @Bean
    public ServletRegistrationBean buildUReportServlet(){
        return  new ServletRegistrationBean(new UReportServlet(),"/ureport/*");
        //访问地址：http://IP:端口/ureport/designer
    }
}
